/**
 * +----------------------------------------------------------------------
 * | 友得云客  - 开启房产营销新纪元
 * +----------------------------------------------------------------------
 * | Copyright (c) 2019~2023 优得（西安）信息科技有限公司版权所有
 * +----------------------------------------------------------------------
 * | Licensed 友得云客不是自由软件 未经允许不可移除相关版权
 * +----------------------------------------------------------------------
 * | Author: www.youdeyunke.com
 * +----------------------------------------------------------------------
 */
import request from '@/utils/request'


// 查询获取授权码信息
export function getLicenseInfo() {
  return request({
    url: '/admin6/license',
    method: 'get'
  })
}

export function refreshLicenseInfo(licenseKey) {
  return request({
    url: '/admin6/license/sync',
    method: 'patch'
  })
}

export function replaceLicenseInfo( newLicneseKey) {
  return request({
    url: `/admin6/license/replace/${newLicneseKey}`,
    method: 'patch'
  })
}

export function updateCopyright(data) {
  return request({
    url: '/admin6/myconfigs/update_copyright',
    method: 'PATCH',
    data: data
  })
}

export function updateLogo(logoUrl) {
  return request({
    url: '/admin6/myconfigs/update_logo',
    method: 'PATCH',
    data: {
      logo: logoUrl
    }
  })
}



export function getLicenseValueByKey(key) {
  return request({
    url: '/admin6/license/' + key ,
    method: 'get',
  })
}
